﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.IO;
using System.Drawing;

namespace Intel.Server.GuiPlugins
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的类名“Service1”。
    public class PluginsServer : IPluginServer
    {
        public List<PluginInfo> GetPluginsList()
        {
            List<PluginInfo> Infos = new List<PluginInfo>();
            PluginInfo info = new PluginInfo();
            info.AddTime = DateTime.Now;
            info.Author = "Test";
            info.Name = "pp";
            info.Uuid = 123;
            info.DetailInfo = "Test Detail Info1";
            Infos.Add(info);
            PluginInfo i = new PluginInfo();
            i.AddTime = DateTime.Now - TimeSpan.FromDays(1);
            i.Author = "test2";
            i.Name = "pp2";
            i.Uuid = 321;
            i.DetailInfo = "Test Detail Info3";
            Infos.Add(i);
            return Infos;

        }

        public Stream GetPic(int Uuid)
        {
            FileStream fs = new FileStream("d:\\test.jpg", FileMode.Open, FileAccess.Read);
            System.Threading.Thread.Sleep(3000);
            return fs;
        }
    }
}
